Release 10.1A: OpenEdge Development:
Java Open Clients


Remote 4GL methods

ProxyGen maps each Progress 4GL non-persistent procedure, internal procedure, and user-defined function exposed on the AppServer to a remote 4GL method. These methods are part of an AppObject, SubAppObject, or ProcObject. ProxyGen generates method names using automatic conversion and conventions. For more information on proxy generation, see OpenEdge Development: Open Client Introduction and Programming .

Two sample non-persistent procedures follow:

AddAccount.p: 
DEFINE INPUT PARAMETER accountNum AS INTEGER. 
DEFINE INPUT PARAMETER name AS CHARACTER. 
   . 
   . 
   . 
RemoveAccount.p: 
DEFINE INPUT PARAMETER accountNum AS INTEGER. 
DEFINE OUTPUT PARAMETER name AS CHARACTER. 
   . 
   . 
   . 

ProxyGen generates the following Java proxy methods:

public void AddAccount(int accountNum, String name) 
public void RemoveAccount(int accountNum, StringHolder name) 

Passing parameters

ProxyGen maps 4GL data types to equivalent data types in Java for 4GL INPUT, OUTPUT, and INPUT-OUTPUT parameters. For details, see Chapter 4, " Passing Parameters."

Handling return values

When using ProxyGen, you can optionally specify whether the 4GL RETURN-VALUE should be added to the Java proxy method, for each non-persistent procedure and internal procedure (user-defined functions always return a value.) If this is not specified, the method returns void. If specified for the non-persistent procedures above, ProxyGen generates the following Java proxy methods:

public String AddAccount(int accountNum, String name) 
public String RemoveAccount(int accountNum, StringHolder name) 

Also, if you did not specify to return the 4GL RETURN-VALUE, the client can access the current value of the 4GL RETURN-VALUE function by calling the _getProcReturnString() common method. For more information, see the "Common methods" section.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095